package com.example.demo.service.exam;

import com.example.demo.domain.exam.Exam;
import com.example.demo.domain.exam.Paging;
import com.example.demo.domain.exam.QueryModel;
import com.example.demo.domain.exam.condition.ExamCondition;
import com.example.demo.domain.PageResult;
import com.example.demo.dto.ExamUserSingleQuesScoreDTO;
import com.example.demo.dto.ExamClassStaffDTO;
import com.example.demo.dto.OneClickReviewDTO;
import com.example.demo.dto.RepeatDTO;
import com.example.demo.dto.ResetIpDTO;
import com.example.demo.service.Clause;

import java.util.List;


public interface ExamService {


    /**
     * 创建考试
     */
    void createExam(Exam exam);

    /**
     * 获取考试人员
     * @param id 试卷标识
     */
    List<ExamClassStaffDTO> getExamStaff(Long id);

    /**
     * 培训师查看所有考试分页接口
     */
    PageResult<Exam> page(QueryModel<ExamCondition> query);

    /**
     * 用户获取所有考试分页接口
     */
    PageResult<Exam> pageForUser(QueryModel<ExamCondition> query);

    /**
     * 更新考试
     * @param exam 试信息
     */
    void updateExam(Exam exam);

    void updateExams(List<Exam> exams);

    Exam getExamById(Long examId);

    void reviewExamPaper(ExamUserSingleQuesScoreDTO dto);

    void oneClickReview(OneClickReviewDTO dto);

    List<Exam> getExamByClassId(Long classId);

    void resetIp(ResetIpDTO dto);

    void resetExam(Long examId, Long userId);

    void batchOneClickReview(Long examId);

    List<RepeatDTO> getExamRepeat(Long examId);

    List<Exam> getRecentExam(Paging paging);

    List<Exam> getExamByClause(Clause clause);

    void updateExamAttendNum(Long examId);
}
